package work.learn.base;

// 定义一个抽象类
abstract class Shape {
    // 抽象方法
    public abstract void draw();

    // 普通方法
    public void commonMethod() {
        System.out.println("This is a common method in Shape.");
    }
}

class Circle extends Shape {
    @Override
    public void draw() {
        System.out.println("Circle.get = " + this.getClass().getName());
    }
}


public class Abstract {
    public static void main(String[] args) {
        Shape shape = new Circle();
        shape.draw();
        shape.commonMethod();
    }
}
